package com.hqyj.controller.TraderAndStorage;

import com.hqyj.pojo.ResultVoH;
import com.hqyj.pojo.Suppliers;
import com.hqyj.service.ISuppliersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program:InvoicingObj
 * @description:
 * @author:黄明亮
 * @create:2022-09-30 16:00
 **/
@RestController
@RequestMapping("/user")
public class SuppliersController {
    @Resource
    private ISuppliersService suppliersService;

    @GetMapping("/suppliers")
    public ResultVoH selectAll(){
        ResultVoH vo = suppliersService.selectAll();
        return vo;
    }

    @GetMapping("/querySuppliers")
    public ResultVoH querySuppliers(Suppliers suppliers){
        return suppliersService.QueryByCondition(suppliers);
    }

    @GetMapping("/updateSuppliers")
    public ResultVoH updateSuppliers(Suppliers suppliers){
        return suppliersService.updateByCondition(suppliers);
    }

    @GetMapping("/addSuppliers")
    public ResultVoH addSuppliers(Suppliers suppliers){
        return suppliersService.addSuppliers(suppliers);
    }

    @GetMapping("/deleteSuppliers")
    public ResultVoH deleteSuppliers(Suppliers suppliers){
        return suppliersService.deleteSuppliers(suppliers);
    }

}
